import React from 'react'
import { Outlet, useNavigate } from "react-router-dom"

export default function Home() {

  const navigate = useNavigate()

  const toMusicHandle = () => {
    navigate("/main/home/music")
  }

  const toNewsHandle = () => {
    navigate("/main/home/news")
  }

  return (
    <div>
      <h3>我是home3的内容</h3>
      <button onClick={toMusicHandle}>音乐</button>
      <button onClick={toNewsHandle}>新闻</button>
      <Outlet />
    </div>
  )
}
